package com.itheima.api.my_factorial;

public class Test2 {
    public static void main(String[] args) {
        //
        int result = getJc(5);
        System.out.println(result);
    }

    private static int getJc(int i) {
        if (i == 1) {
            return 1;
        } else {
            return i * getJc(i - 1);
        }
    }


}
